﻿namespace Example
{
    using System;

    public sealed class Tally
    {
        public int Value { get; private set; }

        public void Decrement()
        {
            if (0 == Value)
            {
                throw new InvalidOperationException();
            }

            Value--;
        }

        public void Increment()
        {
            Value++;
        }
    }
}